package com.supcon.exchangedata.repository.slave6;

import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjCleanSewage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface SlaveHjCleanSewageInfo extends JpaRepository<HjCleanSewage, Long> {
    @Transactional
    @Query(nativeQuery = true, value = "SELECT * FROM hj_clean_sewage WHERE 'day' = (SELECT MAX(day) FROM hj_electricity_info) limit 1")
    HjCleanSewage findByTop();
}
